package com.lbd.common.constrant;

/**
 * @ProjectName: gulimall
 * @Package: com.lbd.common.constrant
 * @ClassName: ProductConstrant
 * @Author: linbd
 * @Description:
 * @Date: 2021/6/17 17:16
 */
public class ProductConstrant {
    public static final String CATALOG_KEY = "catalog_key";
    public static final String CATALOG_LOCK_KEY = "catalog_lock";
    //分类信息超时时间
    public static final Long CATALOG_EXPIRE_TIME = 60 * 60 * 24l;
    //锁超时时间
    public static final Long CATALOG_LOCK_EXPIRE_TIME = 30l;

    public enum AttrType {
        SALE(0, "销售属性"),
        BASE(1, "基本属性");

        int code;
        String msg;

        private AttrType(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }

    public enum SpuStatusEnum {
        NEW_SPU(0, "新建"),
        SPU_UP(1, "商品上架"),
        SPU_DOWN(2, "商品下架");
        private int code;
        private String msg;

        SpuStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }
    }
}
